/**
 * Created by DELL on 2016/4/9.
 */
package cc.openhome;
import java.io.*;
public class IO {
    public static void dump(InputStream src, OutputStream dest)//数据来源与目的地
    throws IOException{
        try(InputStream input=src;OutputStream output=dest){
            byte[] data=new byte[1024];
            int length;
            while((length=input.read(data))!=-1){
                output.write(data,0,length);
            }
        }
    }
}
